SpringBoot官方文档翻译(五):部署你的第一个Spring Boot应用

11. Developing Your First Spring Boot Application(部署你的第一个Spring Boot应用)

1
2
3
This section describes how to develop a simple “Hello World!” web     
application that highlights some of Spring Boot’s key features. We
use Maven to build this project, since most IDEs support it.

本节讲述了如何部署一个简单的”Hello World”的Web应用,突出讲述了一些Spring Boot的关键功能。我们使用Maven去构建这个工程,因为大多数IDE支持它。

1
2
3
4
5
6
7
The spring.io web site contains many “Getting Started” guides that     
use Spring Boot. If you need to solve a specific problem, check
there first.You can shortcut the steps below by going to 
start.spring.io and choosing the "Web" starter from the
dependencies searcher. Doing so generates a new project structure
so that you can start coding right away. Check the Spring Initializr
documentation for more details.

spring.io网站包含了很多使用Spring Boot的“入门”向导。如果你需要解决一个特殊的问题,可以首先从那里寻找答案。您可以通过start.spring.io从依赖中找到“Web starter”来简化以下步骤。这样做会产生一个新的项目结构,以便您可以立即开始编码。查看Spring Initializr文档以获取更多详细信息。

1
2
Before we begin, open a terminal and run the following commands    
to ensure that you have valid versions of Java and Maven installed:

在我们开始之前,打开terminal窗口,运行以下指令去确认您是否安装有符合版本的java和maven

1
2
3
4
$ java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

1
2
3
4
$ mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_102, vendor: Oracle Corporation
This sample needs to be created in its own folder. Subsequent     
instructions assume that you have created a suitable folder and     
that it is your current directory.

此示例需要在其自己的文件夹中创建。随后说明假定您已经创建了合适的文件夹和
它是你当前的目录。

分享到